<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>申请书编辑</title>
<script type="text/javascript" src="${res}/js/jquery/jquery.form.js"></script>
<script type="text/javascript"
	src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript"
	src="${res}/js/validate/irisvalidator.js"></script>
<script type="text/javascript"
	src="${res}/js/keyword/keywordtips.js"></script>	
<script type="text/javascript"
	src="${res_app}/js/app/proposal/irisPrpPrepare.js"></script>

<style>	
	textarea{overflow:auto;}
</style>
<script type="text/javascript">
$(function(){
	queryflex();
});
/**
 * 申请书提交方法
 */


var ctxpath = "${ctx}";
var prcWin = new progressWin("${res}");//初始化遮罩层
/**
 * 页面初始化方法 所有的都定义在里面
 */
$(document).ready (function() {
	$("#wbox1").click(function() {
		check("check");
	});
	
	$("#wbox2").click(function() {
		
		check("check");
		
	});
	
	initControl();
	
	$("table.t_css").each(function(){
		$(this).find("tr").not($(".cbTable").find("tr")).each(function(index){
		if(index%2==0)
		$(this).removeClass("li_1").addClass("li_2");
		else
		$(this).removeClass("li_2").addClass("li_1");
		});
		}); 
	
	$("#basicInfo3").each(function(){
		$(this).find("tr").not($(".cbTable").find("tr")).each(function(index){
		if(index%2==0)
		$(this).removeClass("li_2").addClass("li_1");
		else
		$(this).removeClass("li_1").addClass("li_2");
		});
	}); 
	
	
	$("table").addClass("table01");
	$("#checkbox_table_").removeClass("table01");
	$("#feaReport_upload").removeClass("table01");
	$("#prpProduct_text").removeClass("table01");
	$("#gg_prpProduct_text").removeClass("table01");
	
	var prp_version=$("#prp_version").text();
	if(prp_version==''){
		$("#psn_eqp_wide").find(":input").each(function(){
			$(this).val("0");	
		});
		$("#invest_wide").find(":input").each(function(){
			$(this).val("0.00");	
		});
		$("#sci1_total").val("0");
		$("#ei1_total").val("0");
		$("#cpci1_total").val("0");
		$("#others1_total").val("0");
		
		$("#ei2_total").val("0");
		$("#cpci2_total").val("0");
		$("#sci2_total").val("0");
		$("#others2_total").val("0");
		
		
		
	}
	
	
    //$('div').find("[id^='checkbox_dyn_']").find("tr").removeClass("li_1").removeClass("li_2");
    $('div').find("[id^='checkbox_dyn_']").find("td").css("border",'0px solid');
	
	window.setInterval("checkPdfStatus()", "10000");//检验申请书的pdf
});

$(document).ready(function() {
	fileInit("feaReport_upload","PDF");
	fileInit("prpProduct_text","PDF");
	fileInit("gg_prpProduct_text","PDF");
/* 	fileInit("prpContent_upload","JPG,PDF,TIFF,XLS,DOC,WPS",null,"{'JPG':'51200','PDF':'51200','TIFF':'51200','XLS':'51200','DOC':'51200','WPS':'51200'}");	
 */ 
	fileInit("prpContent_upload","PDF",null,"");	
 //fileInitAttach("attachAdd", "JPG,PDF", null, 20, "{'JPG':'3072','PDF':'3072'}");
	$("#prpContent_upload").find(".file").hide();//隐藏文本框
	//setSubmitPsn3();
	//setSubmitPsn2();
});


$(document).ready(function() {
	$("#org").attr("disabled","true");
	initDepartForComplete("org");
	 initControl();
	 $("#subject1").attr("disabled",false);
	 $("#subject2").attr("disabled",false);
});

/**
 * 申报日期默认为当前日期
 */
$(document).ready(function() {

	var nowDate = '${sercverSysDate1}';
    if($("#submit_date").val()==""){
	   $("#submit_date").val(nowDate);
    }

});

/**
 * 填写检查
 */
function check(type){
	
	validate($("#basicInfo1"),"项目基本情况");
	var issecret = $("#issecret").val();
	if(issecret == '01'){
		irisValaddMsg("国家秘密技术项目不能在该系统填报，请联系成果处工作人员，联系电话：029-87298893");
	}
	validate($("#basicInfo2"),"项目基本情况");
	var keyword = $.trim($("#keyword").val());
	if(keyword != ""){
		var wordArray = keyword.split("；")
		if(wordArray.length < 3 || wordArray.length >7){
			irisValaddMsg("项目基本情况-->主题词填写格式不规范，请填写3个至7个与推荐项目技术内容密切相关的主题词，每个词语间应加“；”号");
		}else{
			for(var i = 0;i<wordArray.length;i++){
				if(wordArray[i].length > 6)
					irisValaddMsg("项目基本情况-->主题词中第"+[i+1]+"个主题词超过6个汉字，请修改");
			}
		}
	}
	
	var subject1 = $("#subject1").val();
	var subject2 = $("#subject2").val();
	var subject3 = $("#subject3").val();
	if(subject1 == "" && subject2 =="" && subject3=="")
		irisValaddMsg("项目基本情况-->学科分类名称及代码请至少选择一个");
	
	if(subject1 != "" && subject2 != ""){
		if(subject1 == subject2)
			irisValaddMsg("项目基本情况-->学科分类名称及代码1与学科分类名称及代码2重复");
	}
	if(subject1 != "" && subject3 != ""){
		if(subject1 == subject3)
			irisValaddMsg("项目基本情况-->学科分类名称及代码1与学科分类名称及代码3重复");
	}
	if(subject2 != "" && subject3 != ""){
		if(subject2 == subject3)
			irisValaddMsg("项目基本情况-->学科分类名称及代码2与学科分类名称及代码3重复");
	}
	
	
	
	validate($("#basicInfo3"),"项目基本情况");
	if(!irisValDateCompareSpecial($("#end_date"),$("#lastYear")))
		irisValaddMsg("项目完成1年以后才允许推荐省科技奖");
	
	validate($("#introduction"),"项目简介");
	validate($("#project1"),"项目内容");
	validate($("#prpProduct_text"),"项目内容-->详细科学技术内容 "); 
	validate($("#project2"),"项目内容");
	validate($("#gg_prpProduct_text"),"项目内容-->与国内外同类研究、技术的比较 "); 
	
	var type2 = $("#tech_type_value").val();
	if(type2=='05'){
		validate($("#projectqhh_other"),"项目内容");
		validateByTabRow($("#tg_app_org_info_other"),"项目内容-->代表性论文专著他引情况表",0);
	}else{
		validate($("#project3"),"项目内容");
		validateByTabRow($("#tg_app_org_info"),"项目内容-->推广应用单位情况表",1);
		validate($("#pri_info_zjjjxy"),"项目内容");
	}
	
	//validate($("#projectQhh"),"项目内容");
	validate($("#third_comment"),"第三方评价");
	validateByTabRow($("#award_state"),"获奖情况-->本项目曾获科技奖励情况");
	validateByTabRow($("#knowledge"),"知识产权-->主要知识产权证明目录");
	
	var flag = 0;//用于判断页面中是否完成js查重，如果完成=0，则再与已获奖科技项目做对比 
	//授权号查重 
	var dup = duplicateCheck("knowledge","approve_no");
	if(dup.length>0){
		irisValaddMsg("知识产权-->主要知识产权证明目录-->以下授权号在列表中重复出现：["+dup.join(",")+"]");
		flag ++;
	}
	
	validateByTabRow($("#tabRepresentPaper"),"论文专著目录-->代表性论文专著目录");
	dup = duplicateCheck("tabRepresentPaper","represent");
	if(dup.length>0){
		irisValaddMsg("论文专著目录-->代表性论文专著目录-->以下论文专著名称在列表中重复出现：["+dup.join(",")+"]");
		flag ++;
	}
	
	
	validateByTabRow($("#tabPaper"),"论文专著目录-->主要论文专著目录");
	
	dup = duplicateCheck("tabPaper","mainpaper");
	if(dup.length>0){
		irisValaddMsg("论文专著目录-->主要论文专著目录-->以下论文专著名称在列表中重复出现：["+dup.join(",")+"]");
		flag ++;
	}
	
	/*  $("#tabRepresentPaper").find(":input[id^='represent']").not("input[id='represent[0]']").each(function(i,paper1){
		$("#tabPaper").find(":input[id^='mainpaper']").not("input[id='mainpaper[0]']").each(function(j,paper2){
			if($.trim($(paper1).val()) == $.trim($(paper2).val()) && $.trim($(paper1).val())!="" && $.trim($(paper2).val())!=""){
				var index1 = i+1;
				var index2 = j+1;
				irisValaddMsg("论文专著目录-->代表性论文专著目录的第"+index1+"行的论文专著名称与主要论文专著目录的第"+index2+"行的论文专著名称重复，请修改");
				flag ++;
			}
		});
	});  */
	
	
	
	if(flag == 0)
		ajaxDuplicateCheck();
	
	validateByTabRow($("#zh_persons"),"主要完成人-->主要完成人情况");
	
	//异步校验参与人是否已经存在了
	ajaxJoinPersonExistCheck();
	
	validateByTabRow($("#organizations"),"主要完成单位-->主要完成单位情况");

	validateByTabRow($("#award_fjmucl"),"附件材料目录-->附件材料目录",1);
	
	
 	/* validate($("#tab_01"),"其他统计信息-->专利、软件著作权项数");
	validate($("#tab_02"),"其他统计信息-->标准、规范");
	validate($("#tab_03"),"其他统计信息-->发表论文、著作情况");
	validate($("#tab_04"),"其他统计信息-->科研投资情况");
	validate($("#tab_05"),"其他统计信息-->生产投资情况");  */
	
   
	if($("#recommend_type").val() == '02')
    	validate($("#feaReport_upload"),"推荐专家意见"); 
    
 
     
   var prp_attach_arrays_check=new Array();
   var boolean_contains=false;
   var total=0;
   var total1=0;
   $("#award_fjmucl > tbody").find("tr:gt(0)").each(function(){
 		var v=$(this).find("[name$='kxjsj_fjmu_value']").val();
 		if(v!=''){
 			for ( var i = 0; i < prp_attach_arrays_check.length; i++) {
				if(prp_attach_arrays_check[i]==v){
					boolean_contains=true;
					break;
				}
			}
 			if(!boolean_contains){
 				prp_attach_arrays_check.push(v);
 			}

 			
 		}
 		
 		
 	});

   prp_attach_arrays_check.sort(); 
   for ( var i = 0; i < prp_attach_arrays_check.length; i++) {

		if(prp_attach_arrays_check[i]=='915'){
		 	checkAttach(915,0,'科技成果登记表','');
		}else if(prp_attach_arrays_check[i]=='916'){
			checkAttach(916,0,'推广应用（他引）证明','');
		}else if(prp_attach_arrays_check[i]=='917'){
			checkAttach(917,0,'知识产权证明','');
		}else if(prp_attach_arrays_check[i]=='918'){
			checkAttach(918,0,'论文专著证明','');
		}else if(prp_attach_arrays_check[i]=='919'){
			checkAttach(919,0,'第三方评价证明','');
		}else if(prp_attach_arrays_check[i]=='920'){
			checkAttach(920,0,'获奖证明','');
		}else if(prp_attach_arrays_check[i]=='921'){
			checkAttach(921,0,'合作关系说明','');
		}else if(prp_attach_arrays_check[i]=='922'){
			checkAttach(922,0,'其他证明','');
		}
	}
    
    
	if(!valResult()){
		irisValShowMsg($("#wbox1"));
		return false;
	}
	if(type=="check"){
		showBox($("#wbox1"), "300px", "200px", "检查通过","1:所有检查全部合格");
	}
	return true;
}

//查重 
function duplicateCheck(tableId,inputId){
	var approveArray = new Array();
	$("#"+tableId).find(":input[id^='"+inputId+"']").not("input[id='"+inputId+"[0]']").each(function(i,kn){
		approveArray.push($.trim($(kn).val()));
	});
	approveArray.sort();
	var dup = new Array();
	for(i=0;i<approveArray.length;i++){
		if(approveArray[i]==approveArray[i+1]){
			var flag = 0;
			for(j=0;j<dup.length;j++){
				if(dup[j] == approveArray[i]) {
					flag = 1;
					break;
				}
			}
			if(!flag)
				dup.push(approveArray[i]);
		}
	}
	return dup;
}


function ajaxDuplicateCheck(){
	var knArray = new Array();
	var approvestr = "{";
	$("#knowledge").find(":input[id^='approve_no']").not("input[id='approve_no[0]']").each(function(i,kn){
		if($.trim($(kn).val()) != "")		
			knArray.push($.trim($(kn).val()));
	});
	for(i=0;i<knArray.length;i++){
		if(i == knArray.length-1)
			approvestr += i+":" +"\"" + knArray[i] +"\"";
		else
			approvestr += i+":" +"\"" + knArray[i] +"\",";
	}
	approvestr += "}";
	
	knArray.length = 0;
	var paperstr = "{";
	$("#tabRepresentPaper").find(":input[id^='represent']").not("input[id='represent[0]']").each(function(i,paper1){
		if($.trim($(paper1).val()) != "")		
			knArray.push($.trim($(paper1).val()));
	});
	$("#tabPaper").find(":input[id^='mainpaper']").not("input[id='mainpaper[0]']").each(function(j,paper2){
		if($.trim($(paper2).val()) != "")		
			knArray.push($.trim($(paper2).val()));
	});
	

	for(i=0;i<knArray.length;i++){
		if(i == knArray.length-1)
			paperstr += i+":" +"\"" + knArray[i] +"\"";
		else
			paperstr += i+":" +"\"" + knArray[i] +"\",";
	}
	paperstr += "}";
	
	if(approvestr == "{}" && paperstr == "{}")
		return;
	var url = "${ctx}/prpapprove/science-tech-check";
	$.ajax({
		url : url,
		async:false,
		data : {
			"approve" : approvestr,
			"paper"   : paperstr
		},
		dataType : "json",
		type : "post",
		success : function(data) {
			if(typeof(data.approve)!="undefined" && data.approve != ""){
				irisValaddMsg(data.approve);
			}
			if(typeof(data.paper) !="undefined" && data.paper != ""){
				irisValaddMsg(data.paper);
			}
		},
		error : function(msg) {
			scmError("操作失败!", null, 2000);
		}
	});
}


//参与人查重
function ajaxJoinPersonExistCheck(){
	//预留,用于校验提示显示人员名称
	var psnNameArray = new Array();
	var psnCardCodeArray=new Array();
	var psncardCodestr = "{";
	$("#zh_persons >tbody").find("tr:gt(0)").each(function(i,kn){
		var psn_name=$(this).find("span[name$='basic_info/zh_name']").text();
		var psn_card_code=$(this).find("input[name$='basic_info/card_code']").val();
		
		if($.trim(psn_name) != "")		
			psnNameArray.push($.trim(psn_name));
		if($.trim(psn_card_code) != "")		
			psnCardCodeArray.push($.trim(psn_card_code));
	});
	
	for(i=0;i<psnCardCodeArray.length;i++){
		if(i == psnCardCodeArray.length-1)
			psncardCodestr += i+":" +"\"" + psnCardCodeArray[i] +"\"";
		else
			psncardCodestr += i+":" +"\"" + psnCardCodeArray[i] +"\",";
	}
	psncardCodestr += "}";
	
	if(psncardCodestr == "{}")
		return;
	var url = "${ctx}/prpapprove/science-psncardcode-check";
	//预留,此字段目前没用到
	var nowPosCode=$("#posCode").val();
	if(nowPosCode!=''){
		$.ajax({
			url : url,
			async:false,
			data : {
				"psncardCodestr" : psncardCodestr,
				"posCode" : nowPosCode
			},
			dataType : "json",
			type : "post",
			success : function(data) {
				if(typeof(data.results)!="undefined" && data.results != ""){
					showPsnCardCheckResults(data.results);
				}
				
			},
			error : function(msg) {
				scmError("操作失败!", null, 2000);
			}
		});
	}
	
}


function showPsnCardCheckResults(results){
	var row_indexs=results.split(",");
	for ( var i = 0; i < row_indexs.length; i++) {
		var array_element = parseInt(row_indexs[i],10);
		if(array_element!='' && !isNaN(array_element)){
			array_element=array_element+1;
			irisValaddMsg("主要完成人-->主要完成人情况第"+(array_element)+"行,该人员今年已经申报或者参与过一次科学技术奖的申报");
		}
	}
}


function setTotalAmt(){
	/* $('#total_amt').val($("#input_total").val()); */
	//$('#request_amt').val($("#source_apply").val());
}


function irisValDateCompareSpecial(d1, d2) {

	var str1 = getTagValueByJq(d1);
	var str2 = getTagValueByJq(d2);

	if (str1 == "" || str2 == "")
		return true;

	var flag = true;
	if (!irisValDateByObjPure(d1))
		flag = false;
	if (!irisValDateByObjPure(d2))
		flag = false;
	if (!flag)
		return true;

	var firstDate;
	var secondDate;
	if (locale == "en_US") {
		d1Array = (str1.split("/"));
		d2Array = (str2.split("/"));

		firstDate = new Date(d1Array[2], getDateNumber(d1Array[0]) - 1,
				getDateNumber(d1Array[1]));
		secondDate = new Date(d2Array[2], getDateNumber(d2Array[0]) - 1,
				getDateNumber(d2Array[1]));
	} else {
		d1Array = (str1.split("-"));
		d2Array = (str2.split("-"));

		firstDate = new Date(d1Array[0], getDateNumber(d1Array[1]) - 1,
				getDateNumber(d1Array[2]));
		secondDate = new Date(d2Array[0], getDateNumber(d2Array[1]) - 1,
				getDateNumber(d2Array[2]));
	}

	if (firstDate < secondDate)
		return true;
	else {
		var strLaber1 = "";
		if (d1.attr("label") != null) {
			strLaber1 = d1.attr("label");
		}
		var strLaber2 = "";
		if (d2.attr("label") != null) {
			strLaber2 = d2.attr("label");
		}
		return false;
	}

}


$(function(){
	//专业评审组影响类别选择
	var v_checked=$("#group_type_value").val()+"";
	$("#tech_type").find("option[value='01']").remove();
	$("#tech_type").find("option[value='02']").remove();
	$("#tech_type").find("option[value='03']").remove();
	$("#tech_type").find("option[value='04']").remove();
	$("#tech_type").find("option[value='05']").remove();
	
	var v_select_value=$("#tech_type_value").val()+"";
	
	var v_str1="<option value='01' title='技术发明' ";
	var v_str2="<option value='02' title='技术开发' ";
	var v_str3="<option value='03' title='技术推广' ";
	var v_str4="<option value='04' title='社会公益' ";
	var v_str5="<option value='05' title='基础研究' ";
	
	if(v_select_value=='01'){
		v_str1+="selected >技术发明</option>";
		v_str2+=" >技术开发</option>";
		v_str3+=" >技术推广</option>";
		v_str4+=" >社会公益</option>";
		v_str5+=" >基础研究</option>";
	}else if(v_select_value=='02'){
		v_str1+=" >技术发明</option>";
		v_str2+="selected >技术开发</option>";
		v_str3+=" >技术推广</option>";
		v_str4+=" >社会公益</option>";
		v_str5+=" >基础研究</option>";
	}else if(v_select_value=='03'){
		v_str1+=" >技术发明</option>";
		v_str2+=" >技术开发</option>";
		v_str3+="selected >技术推广</option>";
		v_str4+=" >社会公益</option>";
		v_str5+=" >基础研究</option>";
	}else if(v_select_value=='04'){
		v_str1+=" >技术发明</option>";
		v_str2+=" >技术开发</option>";
		v_str3+=" >技术推广</option>";
		v_str4+="selected >社会公益</option>";
		v_str5+=" >基础研究</option>";
	}else if(v_select_value=='05'){
		v_str1+=" >技术发明</option>";
		v_str2+=" >技术开发</option>";
		v_str3+=" >技术推广</option>";
		v_str4+=" >社会公益</option>";
		v_str5+="selected >基础研究</option>";
	}else{
		v_str1+=" >技术发明</option>";
		v_str2+=" >技术开发</option>";
		v_str3+=" >技术推广</option>";
		v_str4+=" >社会公益</option>";
		v_str5+=" >基础研究</option>";
	}
	
	if(v_checked=='01'||v_checked=='02' ||v_checked=='12'  ||v_checked==''){
		$("#tech_type").append(v_str1);
		$("#tech_type").append(v_str2);
		$("#tech_type").append(v_str3);
		$("#tech_type").append(v_str4);
		$("#tech_type").append(v_str5);
	}else if(v_checked=='14'||v_checked=='15'){
		$("#tech_type").append(v_str5);
	}else{
		$("#tech_type").append(v_str1);
		$("#tech_type").append(v_str2);
		$("#tech_type").append(v_str3);
		$("#tech_type").append(v_str4);
	}
});


</script>
<style>
	textarea{overflow:   auto;}
</style>
</head>
<body>

	<c:set var="xmlstr" value="${xmlData}" />
	<x:parse xml="${xmlstr}" var="xmlData" />
	
	<c:set var="nature_value">
	<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />
	</c:set>
	<input type="hidden" id="nature_value1"  value="<x:out
		select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />"/>
	
	<c:set var="lastYearToDay"><%=year-1 +"-"+ (month<10 ? "0" :  "")+ month +"-"+ (day<10 ? "0" :  "") + day%></c:set>
	<input type="hidden" id="childDiv" class="thickbox"/>
	<input type="hidden" id="filePath" value="${ctx}/file/ajax-filedownload?fileCode=" />
	<input type="hidden" id="menuId" value="${param.menuId}" />
	<input type="hidden" id="sysDate" value="${sercverSysDate}" />
	<input type="hidden" id="lastYear" value="${lastYearToDay}"/>
	
	<div id="showMessage"></div>
	<div id="content">
		
		<cpt:helpTips key="prpedit" id="prpEditTips"></cpt:helpTips>
		<div class="clear_h15"></div>
		<div class="word_box" id="mainDiv">
			<div class="bar_btn">
				<span class="left"> 
					<c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
					<c:set var="flag_shizhi"><x:out select="$xmlData/data/proposal/flag_shizhi" /></c:set>
					<input name="Submit" type="button" class="button_01" value="保存" onclick="saveAction()" /> 
					&nbsp; <c:if test="${not empty fbl.pdfViewUrl}"><input name="Submit" type="button" class="button_01" value="下载PDF"  onclick="genPdfAction()"/></c:if>
					<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
					&nbsp; <input name="Submit" type="button" class="button_01"	value="提交给单位管理员" onclick="submitAction()" />
					</security:authorize>
					<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
					&nbsp; <input name="Submit" type="button" class="button_01"	value="提交到归口管理部门" onclick="submitAction()" />
					</security:authorize> 
					&nbsp; <input name="Submit" type="button" class="button_01" value="返回" onclick="backToList()" />
				</span>
				<span class="right"> 
					<input title="填写检查" class="btn_inspect" type="button" id="wbox1"/>
				</span>
				<span class="right">
				<c:set var="template">科学技术奖填写说明.doc</c:set>
				<input name="Submit" type="button" class="button_01" value="填写说明" onclick="return ContentDownDesc('${template}');" />&nbsp;&nbsp;
				</span>
				
					<c:set var="sub_grant_code"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
					
			</div>
			<div class="bar_b">
				<input type="hidden" id="pdfStatus" value="${pdfStatus}" />
				<span class="right">版本号：<span name="proposal/prp_version" id="prp_version"><x:out select="$xmlData/data/proposal/prp_version" /></span></span>
			</div>
			<form method="post" id="mainForm">
				<input type="hidden" value="${grantCode}" id="grantCode"
					name="grantCode"> 
				<input type="hidden" value="${posCode}" id="posCode" name="posCode"> 
				<input type="hidden" value="<iris:des3 code="${posCode}"></iris:des3>" id="posCodeDes" name="posCodeDes">
				<input type="hidden" value="<iris:des3 code="${fbl.pdfCode}"></iris:des3>" id="pdfCodeDes" name="pdfCodeDes">  
				<input type="hidden" value="${xmlData}" id="xmlData" name="xmlData">
				<input type="hidden" value="${fbl.pdfCode}" id="pdfCode" name="pdfCode"> 
				<input type="hidden" value="${flag_shizhi}" id="flag_shizhi" name="proposal/flag_shizhi"> 
			</form>
				<div class="word_title">
					<c:set var="statYear">${statYear}</c:set>
					<c:if test="${empty statYear}">
						<c:set var="statYear"><x:out select="$xmlData/data/proposal/stat_year" /></c:set>
					</c:if>
					<input type="hidden" name="proposal/stat_year" value="${statYear}">
					<span name="proposal/grant_name" ><x:out select="$xmlData/data/proposal/grant_name" /></span>-推荐书 (<span name="proposal/stat_year">${year} </span>年)<br />					
					<c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
					<%-- (<x:out select="$xmlData/data/proposal/sub_grant_name" />) --%>
					
					<input type="hidden" name="proposal/manage_category" value="<x:out select="$xmlData/data/proposal/manage_category" />" />
					<input type="hidden" name="proposal/sub_grant_name" value="<x:out select="$xmlData/data/proposal/sub_grant_name" />" />
					<input type="hidden" name="proposal/grant_code" value="<x:out select="$xmlData/data/proposal/grant_code" />" />  <input type="hidden" name="proposal/psn_code" value="<x:out select="$xmlData/data/proposal/psn_code" />" />
					<input type="hidden" id="grant_no" name="proposal/grant_no" value="<x:out select="$xmlData/data/proposal/grant_no" />" />							
					<input type="hidden" name="proposal/sub_grant_code" value="<x:out select="$xmlData/data/proposal/sub_grant_code" />" />
					<input name="proposal/register_area_code" type="hidden" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/area_value" />" />
		            <input name="proposal/register_area_name" type="hidden" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/area_name" />" />
					<input type="hidden" id="sub_grant_no" name="proposal/sub_grant_no" value="<x:out select="$xmlData/data/proposal/sub_grant_no" />" />
					<input type="hidden" name="proposal/help_grant_code" value="<x:out select="$xmlData/data/proposal/help_grant_code" />" />
					<input type="hidden" id="help_grant_no" name="proposal/help_grant_no" value="<x:out select="$xmlData/data/proposal/help_grant_no" />" />
					<c:set var="formCode"><x:out select="$xmlData/data/proposal/form_code" /></c:set>
					<c:set var="nature_value"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" /> </c:set>
					<c:if test="${empty formCode}"><c:set var="formCode" value="${param.formCode}"></c:set></c:if>
					<input type="hidden" name="proposal/form_code" value="${formCode}" />
				    <input type="hidden" name="proposal/request_amt" 	id="request_amt" value="<x:out select="$xmlData/data/proposal/request_amt"/>">
					<input type="hidden" name="proposal/year" value="${year}" />
				 	<input type="hidden" name="proposal/org_type_name" id="org_type_name" value="" />
				 	<input type="hidden" name="proposal/submit_date" id="submit_date" value="" />
				 	
					<c:set var="org_type_name"><x:out select="$xmlData/data/proposal/org_type_name" /> </c:set>
				 <!-- 公用的配置界面 -->
				    <jsp:include page="./prpeditmain_public.jsp"><jsp:param value="${xmlstr}" name="xmlstr" /></jsp:include>
				</div>
				<div id="tabnav">
					<ul>
						<!-- <li id="tab1" onclick="changeTab(this.id)">
						    <a href="###"><span>填写说明</span></a>
						</li> -->
						<li  class="down" id="tab2" onclick="changeTab(this.id)">
						    <a href="###"><span>项目基本情况</span></a>
						</li>
						<li  id="tab12" onclick="changeTab(this.id)">
						    <a href="###"><span>项目简介</span></a>
						</li>
						<li  id="tab3" onclick="changeTab(this.id)">
						    <a href="###"><span>项目内容</span></a>
						</li>
						<li  id="tab13" onclick="changeTab(this.id)">
						    <a href="###"><span>第三方评价</span></a>
						</li>
						<li id="tab4" onclick="changeTab(this.id)" >
						    <a href="###"><span>获奖情况</span></a>
						</li>
						<li id="tab5" onclick="changeTab(this.id)" >
						    <a href="###"><span>知识产权</span></a>
						</li>
						<li id="tab6" onclick="changeTab(this.id)">
						    <a href="###"><span>论文专著目录</span></a>
						</li>
						<li id="tab7" onclick="changeTab(this.id)" >
						    <a href="###"><span>主要完成人</span></a>
						</li>
						
					</ul>
				</div>
				<div id="tabnav">
					<ul>
						<li id="tab8" onclick="changeTab(this.id)" >
						    <a href="###"><span>主要完成单位</span></a>
						</li>	
						<li id="tab9" onclick="changeTab(this.id)" >
						    <a href="###"><span>其他统计信息</span></a>
						</li>	
						<li id="tab10" onclick="changeTab(this.id)" >
						    <a href="###"><span>推荐专家意见</span></a>
						</li>
						<li id="tab14" onclick="changeTab(this.id)" >
						    <a href="###"><span>附件材料目录</span></a>
						</li>
						<li id="tab11" onclick="changeTab(this.id)" >
						    <a href="###"><span>附件清单</span></a>
						</li>
					</ul>
				</div>
				<div class="tab_box" id="fragment-tab1" style="display: none">
					<jsp:include page="../instruction/prpEditGuide_kxjsjtjs.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab2" >
					<jsp:include page="../info/prpInfoEdit_kxjsjtjs.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
						<jsp:param value="${grantName}" name="grantName" />
						<jsp:param value="${statYear}" name="statYear" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab12" style="display: none">
					<jsp:include page="../content/prpContentEdit_kxjsjtjs.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				 <div class="tab_box" id="fragment-tab3" style="display: none">
					<jsp:include page="../content/prpContentEdit_kxjsjtjs2.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab13" style="display: none">
					<jsp:include page="../content/prpContentEdit_kxjsjtjs3fpj.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab4" style="display: none">
					<jsp:include page="../content/prpContentEdit_kxjsj.jsp">  
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab5" style="display: none">
					<jsp:include page="../content/prpknowledge_kxjsj.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab6" style="display: none">
					<jsp:include page="../content/prpPaper_kxjsjtjs.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				 <div class="tab_box" id="fragment-tab7" style="display: none">
					<jsp:include page="../psn/prpzhpsn_kxjsjtjs_zywcr.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab8" style="display: none">
					<jsp:include page="../content/prpContentEdit_kxjstjs_zywcdw.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab9" style="display: none">
					<jsp:include page="../content/prpContentEdit_others.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab10" style="display: none">
					<jsp:include page="../content/prpContentEdit_gjkxjshz.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab14" style="display: none">
					<jsp:include page="../content/prpContentEdit_kxjsj_fjmucl.jsp">  
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
				<div class="tab_box" id="fragment-tab11" style="display: none">
					<jsp:include page="../attach/prpAttachEdit_by_common.jsp">
						<jsp:param value="${xmlstr}" name="xmlstr" />
					</jsp:include>
				</div>
			<div class="bar_btn02">
				<span class="left"> 
					<input name="Submit" type="button" class="button_01" value="保存" onclick="saveAction()" /> 
					&nbsp; <c:if test="${not empty fbl.pdfViewUrl}"><input name="Submit" type="button" class="button_01" value="下载PDF"  onclick="genPdfAction()"/></c:if>
					<security:authorize ifNotGranted="A_DAILU_PROPOSAL">
					&nbsp; <input name="Submit" type="button" class="button_01"	value="提交给单位管理员" onclick="submitAction()" />
					</security:authorize>
					<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
					&nbsp; <input name="Submit" type="button" class="button_01"	value="提交到归口管理部门" onclick="submitAction()" />
					</security:authorize> 
					&nbsp; <input name="Submit" type="button" class="button_01" value="返回" onclick="backToList()" /> 
				</span>
				<span class="right"> 
					<input title="填写检查" class="btn_inspect" type="button" id="wbox2"/>
				</span>
				<span class="right">
			    <input name="Submit" type="button" class="button_01" value="填写说明" onclick="return ContentDownDesc('${template}');" />&nbsp;&nbsp;
				</span>
			</div>
		</div>
		<div class="clear_h15"></div>
	</div>
</body>

</html>